
package org.project.d.network.protocol;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.net.InetSocketAddress;
import java.net.SocketAddress;

@EqualsAndHashCode(callSuper = true)
@Data
public final class UDPPacket extends Packet {
    private InetSocketAddress address;

    public UDPPacket() {
    }

    public UDPPacket(byte rpcNum, short cmd, byte flags, byte serializationType, byte lrc, int bodyLength, byte[] body, InetSocketAddress address){
        super(rpcNum,cmd,flags,serializationType,lrc,bodyLength,body);
        this.address = address;
    }
    public UDPPacket(Packet packet,InetSocketAddress address) {
        super(packet);
        this.address = address;
    }
}
